module.exports = (err, ctx) => {
    let status = 500
    switch (err.code) {
        case '500':
            status = 500
            break;
        case '501':
            status = 501
            break;
        case '502':
            status = 502
            break;
        case '503':
            status = 503
            break;
        case '504':
            status = 504
            break;
        default:
            status = 200
    }
    ctx.status = status
    ctx.body = err
}